package Master.interfaces;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.Border;

public abstract class PanelItem extends JPanel{
	private int id;
	private JPanel container = new JPanel(new GridBagLayout());
	
	public PanelItem(int id)
	{
		this.id = id;//Required to identity object this represents
		
        //this.setBorder(BorderFactory.createRaisedBevelBorder());
        this.setLayout(new BorderLayout());
        this.setBackground(Color.WHITE);
        
        container.setBackground(Color.WHITE);
        this.add(container,BorderLayout.WEST);
	}
	
	protected void setBorderStyle(Border b)
	{
		this.setBorder(b);
	}
	
	protected void addComponent(Component comp,GridBagConstraints c)
	{
		container.add(comp,c);
	}
	
	protected void setBackgroundColor(Color this_color)
	{
		container.setBackground(this_color);
	}
	
	protected void setBorderColor(Color this_color)
	{
		this.setBackground(this_color);
	}
	
	protected int getID()
	{
		return id;
	}
}
